From: Keir Fraser Date: Thu, 12 Mar 2009 11:24:25 +0000 (+0000) Subject: Fix Makefile portability: head -n -1 isn't portable. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13992^2~90 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=670741eb9496339f88e0133ce8d96a85040faec1;p=xen.git Fix Makefile portability: head -n -1 isn't portable. Signed-off-by: John Levon --- diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk index 3223bcf4f9..a570d42524 100644 --- a/xen/arch/x86/boot/build32.mk +++ b/xen/arch/x86/boot/build32.mk @@ -10,8 +10,9 @@ $(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all) CFLAGS += -Werror -fno-builtin -msoft-float +# NB. awk invocation is a portable alternative to 'head -n -1' %.S: %.bin - (od -v -t x $< | head -n -1 | \ + (od -v -t x $< | awk 'NR > 1 {print s} {s=$$0}' | \ sed 's/ /,0x/g' | sed 's/^[0-9]*,/ .long /') >$@ %.bin: %.lnk